********************************************************************************gen senate_race = .replace senate_race = 1 if Election_Type=="Senator"replace senate_race = 0 if Election_Type=="Governor"gen Republican_female = 1replace Republican_female = 0 if Republican_Gender == "male"gen Republican_minority = 1replace Republican_minority = 0 if Republican_Ethnicity == "White"gen Democrat_female = 1replace Democrat_female = 0 if Democrat_Gender == "male"gen Democrat_minority = 1replace Democrat_minority = 0 if Democrat_Ethnicity == "White"gen Caucasian_male_election = 0replace Caucasian_male_election = 1 if Republican_Gender == "male" & Democrat_Gender == "male" & Republican_Ethnicity == "White" & Democrat_Ethnicity == "White"gen candidate_age_diff = Democrat_Age - Republican_Agegen Republican_Win = 0replace Republican_Win = 1 if Election_Winner == "Republican"gen Democrat_Win = 0replace Democrat_Win = 1 if Election_Winner == "Democrat"********************************************************************************gen AK = 0gen AL = 0gen AR = 0gen AZ = 0gen CA = 0gen CO = 0gen CT = 0gen DE = 0gen FL = 0gen GA = 0gen HI = 0gen IA = 0gen ID = 0gen IL = 0gen IN = 0gen KS = 0gen KY = 0gen LA = 0gen MA = 0gen MD = 0gen ME = 0gen MI = 0gen MN = 0gen MO = 0gen MS = 0gen MT = 0gen NC = 0gen ND = 0gen NE = 0gen NH = 0gen NJ = 0gen NM = 0gen NV = 0gen NY = 0gen OH = 0gen OK = 0gen OR = 0gen PA = 0gen RI = 0gen SC = 0gen SD = 0gen TN = 0gen TX = 0gen UT = 0gen VA = 0gen VT = 0gen WA = 0gen WI = 0gen WV = 0gen WY = 0replace AK = 1 if Election_State == "AK"replace AL = 1 if Election_State == "AL"replace AR = 1 if Election_State == "AR"replace AZ = 1 if Election_State == "AZ"replace CA = 1 if Election_State == "CA"replace CO = 1 if Election_State == "CO"replace CT = 1 if Election_State == "CT"replace DE = 1 if Election_State == "DE"replace FL = 1 if Election_State == "FL"replace GA = 1 if Election_State == "GA"replace HI = 1 if Election_State == "HI"replace IA = 1 if Election_State == "IA"replace ID = 1 if Election_State == "ID"replace IL = 1 if Election_State == "IL"replace IN = 1 if Election_State == "IN"replace KS = 1 if Election_State == "KS"replace KY = 1 if Election_State == "KY"replace LA = 1 if Election_State == "LA"replace MA = 1 if Election_State == "MA"replace MD = 1 if Election_State == "MD"replace ME = 1 if Election_State == "ME"replace MI = 1 if Election_State == "MI"replace MN = 1 if Election_State == "MN"replace MO = 1 if Election_State == "MO"replace MS = 1 if Election_State == "MS"replace MT = 1 if Election_State == "MT"replace NC = 1 if Election_State == "NC"replace ND = 1 if Election_State == "ND"replace NE = 1 if Election_State == "NE"replace NH = 1 if Election_State == "NH"replace NJ = 1 if Election_State == "NJ"replace NM = 1 if Election_State == "NM"replace NV = 1 if Election_State == "NV"replace NY = 1 if Election_State == "NY"replace OH = 1 if Election_State == "OH"replace OK = 1 if Election_State == "OK"replace OR = 1 if Election_State == "OR"replace PA = 1 if Election_State == "PA"replace RI = 1 if Election_State == "RI"replace SC = 1 if Election_State == "SC"replace SD = 1 if Election_State == "SD"replace TN = 1 if Election_State == "TN"replace TX = 1 if Election_State == "TX"replace UT = 1 if Election_State == "UT"replace VA = 1 if Election_State == "VA"replace VT = 1 if Election_State == "VT"replace WA = 1 if Election_State == "WA"replace WI = 1 if Election_State == "WI"replace WV = 1 if Election_State == "WV"replace WY = 1 if Election_State == "WY"***********************************************************************************SUMMARY STATISTICS***summarize Democrat_EP_Dem_VS Democrat_EP_Repub_VS Political_Facial_Stereotype candidate_age_diff State_Political_Leaningsummarize senate_race Democrat_Incumbent Republican_Incumbent Democrat_female Republican_female Democrat_minority Republican_minoritycorrelate Democrat_EP_Dem_VS Democrat_EP_Repub_VS Political_Facial_Stereotype candidate_age_diff State_Political_Leaning senate_race Democrat_Incumbent Republican_Incumbent Democrat_female Republican_female Democrat_minority Republican_minority***********************************************************************************CORRELATIONS***pwcorr Democrat_EP_Dem_VS Political_Facial_Stereotype, obs sigci2 Democrat_EP_Dem_VS Political_Facial_Stereotype, corrpwcorr Democrat_EP_Repub_VS Political_Facial_Stereotype, obs sigci2 Democrat_EP_Repub_VS Political_Facial_Stereotype, corrpwcorr Democrat_EP_Repub_VS Political_Facial_Stereotype, obs sig, if Democrat_EP_Repub_VS < .91ci2 Democrat_EP_Repub_VS Political_Facial_Stereotype, corr, if Democrat_EP_Repub_VS < .91pwcorr Democrat_EP_Dem_VS Political_Facial_Stereotype, obs sig, if Caucasian_male_election == 1ci2 Democrat_EP_Dem_VS Political_Facial_Stereotype, corr, if Caucasian_male_election == 1pwcorr Democrat_EP_Repub_VS Political_Facial_Stereotype, obs sig, if Caucasian_male_election == 1ci2 Democrat_EP_Repub_VS Political_Facial_Stereotype, corr, if Caucasian_male_election == 1***********************************************************************************TABLE 1 REGRESSIONS******regress Democrat_EP_Dem_VS Political_Facial_Stereotype senate_race Democrat_Incumbent Republican_Incumbent Republican_minority Republican_female Democrat_minority Democrat_female candidate_age_diff, robustregress Democrat_EP_Repub_VS Political_Facial_Stereotype senate_race Democrat_Incumbent Republican_Incumbent Republican_minority Republican_female Democrat_minority Democrat_female candidate_age_diff, robustregress Democrat_EP_Repub_VS Political_Facial_Stereotype AK AL AR AZ CA CO CT DE FL GA HI IA ID IL IN KS KY LA MA MD ME MI MN MO MS MT NC ND NE NH NJ NM NV NY OH OK OR PA RI SC SD TN TX UT VA VT WA WI WV WY senate_race Democrat_Incumbent Republican_Incumbent Republican_minority Republican_female Democrat_minority Democrat_female candidate_age_diff, robustregress Democrat_EP_Repub_VS Political_Facial_Stereotype senate_race Democrat_Incumbent Republican_Incumbent Republican_minority Republican_female Democrat_minority Democrat_female candidate_age_diff, robust, if Democrat_EP_Repub_VS < .91***gen logit_dem_votes = logit(Democrat_EP_Dem_VS)gen logit_rep_votes = logit(Democrat_EP_Repub_VS)regress logit_dem_votes Political_Facial_Stereotype senate_race Democrat_Incumbent Republican_Incumbent Republican_minority Republican_female Democrat_minority Democrat_female candidate_age_diff, robustregress logit_rep_votes Political_Facial_Stereotype senate_race Democrat_Incumbent Republican_Incumbent Republican_minority Republican_female Democrat_minority Democrat_female candidate_age_diff, robustregress logit_rep_votes Political_Facial_Stereotype AK AL AR AZ CA CO CT DE FL GA HI IA ID IL IN KS KY LA MA MD ME MI MN MO MS MT NC ND NE NH NJ NM NV NY OH OK OR PA RI SC SD TN TX UT VA VT WA WI WV WY senate_race Democrat_Incumbent Republican_Incumbent Republican_minority Republican_female Democrat_minority Democrat_female candidate_age_diff, robustregress logit_rep_votes Political_Facial_Stereotype senate_race Democrat_Incumbent Republican_Incumbent Republican_minority Republican_female Democrat_minority Democrat_female candidate_age_diff, robust, if Democrat_EP_Repub_VS < .91***********************************************************************************TABLE 2 REGRESSIONS***summarize Political_Facial_Stereotype State_Political_Leaninggen Political_Facial_Stereotype_c = Political_Facial_Stereotype - .4452501gen State_Political_Leaning_c = State_Political_Leaning - .4871364gen interact_c = Political_Facial_Stereotype_c*State_Political_Leaning_c***regress Democrat_EP_Dem_VS Political_Facial_Stereotype_c State_Political_Leaning_c interact_c senate_race Democrat_Incumbent Republican_Incumbent Republican_minority Republican_female Democrat_minority Democrat_female candidate_age_diff, robustregress Democrat_EP_Repub_VS Political_Facial_Stereotype_c State_Political_Leaning_c interact_c senate_race Democrat_Incumbent Republican_Incumbent Republican_minority Republican_female Democrat_minority Democrat_female candidate_age_diff, robustregress Democrat_EP_Repub_VS Political_Facial_Stereotype_c State_Political_Leaning_c interact_c AK AL AR AZ CA CO CT DE FL GA HI IA ID IL IN KS KY LA MA MD ME MI MN MO MS MT NC ND NE NH NJ NM NV NY OH OK OR PA RI SC SD TN TX UT VA VT WA WI WV WY senate_race Democrat_Incumbent Republican_Incumbent Republican_minority Republican_female Democrat_minority Democrat_female candidate_age_diff, robustregress Democrat_EP_Repub_VS Political_Facial_Stereotype_c State_Political_Leaning_c interact_c senate_race Democrat_Incumbent Republican_Incumbent Republican_minority Republican_female Democrat_minority Democrat_female candidate_age_diff, robust, if Democrat_EP_Repub_VS < .91***regress logit_dem_votes Political_Facial_Stereotype_c State_Political_Leaning_c interact_c senate_race Democrat_Incumbent Republican_Incumbent Republican_minority Republican_female Democrat_minority Democrat_female candidate_age_diff, robustregress logit_rep_votes Political_Facial_Stereotype_c State_Political_Leaning_c interact_c senate_race Democrat_Incumbent Republican_Incumbent Republican_minority Republican_female Democrat_minority Democrat_female candidate_age_diff, robustregress logit_rep_votes Political_Facial_Stereotype_c State_Political_Leaning_c interact_c AK AL AR AZ CA CO CT DE FL GA HI IA ID IL IN KS KY LA MA MD ME MI MN MO MS MT NC ND NE NH NJ NM NV NY OH OK OR PA RI SC SD TN TX UT VA VT WA WI WV WY senate_race Democrat_Incumbent Republican_Incumbent Republican_minority Republican_female Democrat_minority Democrat_female candidate_age_diff, robustregress logit_rep_votes Political_Facial_Stereotype_c State_Political_Leaning_c interact_c senate_race Democrat_Incumbent Republican_Incumbent Republican_minority Republican_female Democrat_minority Democrat_female candidate_age_diff, robust, if Democrat_EP_Repub_VS < .91***********************************************************************************Reverse-Causality-Account Regressions***gen State_Conservativeness = 1 - State_Political_Leaninggen winner_guessed_rep = .replace winner_guessed_rep = Political_Facial_Stereotype if Democrat_Win == 1replace winner_guessed_rep = 1 - Political_Facial_Stereotype if Republican_Win == 1gen winner_age_diff = .replace winner_age_diff = Democrat_Age - Republican_Age if Democrat_Win == 1replace winner_age_diff = Republican_Age - Democrat_Age if Republican_Win == 1regress winner_guessed_rep State_Conservativeness Republican_Win senate_race Democrat_Incumbent Republican_Incumbent Republican_minority Republican_female Democrat_minority Democrat_female winner_age_diff, robustregress winner_guessed_rep State_Conservativeness Republican_Win senate_race Democrat_Incumbent Republican_Incumbent winner_age_diff, robust, if Caucasian_male_election == 1***********************************************************************************FACIAL COMPETENCE CORRELATIONS***pwcorr Democrat_EP_Dem_VS Facial_Competence, obs sigpwcorr Democrat_EP_Repub_VS Facial_Competence, obs sig***********************************************************************************FACIAL ATTRACTIVENESS CORRELATIONS***pwcorr Democrat_EP_Dem_VS Political_Facial_Stereotype Facial_Attractiveness, obs sigpwcorr Democrat_EP_Dem_VS Political_Facial_Stereotype Facial_Attractiveness, obs sig, if Caucasian_male_election == 1pwcorr Democrat_EP_Repub_VS Political_Facial_Stereotype Facial_Attractiveness, obs sigpwcorr Democrat_EP_Repub_VS Political_Facial_Stereotype Facial_Attractiveness, obs sig, if Caucasian_male_election == 1********************************************************************************